package com.gogowan.agroenterprise.widget.adapter;

import android.content.Context;
import android.widget.TextView;

import com.gogowan.agroenterprise.R;
import com.gogowan.agroenterprise.base.AbsListAdapter;
import com.gogowan.agroenterprise.base.ViewHolder;
import com.gogowan.agroenterprise.model.BoxCode;

import java.util.List;

/**
 * @Description: PackAdapter
 * @author mdp
 * @date 2017年1月3日 下午14:10:35
 */
public class HistoryDetailsAdapter extends AbsListAdapter<BoxCode> {

	/**
	 * @param context
	 * @param sourceDatas
	 * @param layoutId
	 */
	public HistoryDetailsAdapter(Context context, List<BoxCode> sourceDatas, int layoutId) {
		super(context, sourceDatas, layoutId);
	}

	@Override
	public void convert(int position, ViewHolder holder, BoxCode bean) {
		((TextView) holder.getView(R.id.pack_item_cpm_tv)).setText(bean.getCode());
		((TextView) holder.getView(R.id.unpack_item_cpmc_tv)).setText("" + bean.getMaterialName());
		((TextView) holder.getView(R.id.unpack_item_cpxh_tv)).setText("" + bean.getMaterialSpecication());
		((TextView) holder.getView(R.id.unpack_item_scrq_tv)).setText("" + bean.getPackDate());
	}
}
